package quartz_exercise.connectmysql.config;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyTask01 implements Job {

    private SimpleDateFormat sf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Override
    public void execute(JobExecutionContext jc) throws JobExecutionException {

//        JobDataMap jobDataMap = jc.getJobDetail().getJobDataMap();
//        Date beginTime = (Date)jobDataMap.get("beginTime");
//        System.out.println(sf.format(beginTime)+"设备开关触发");

        System.out.println("设备开关触发");

    }



}
